import { ElMessage } from "element-plus"

type Isucc1 = (message: string) => void
export const succ1: Isucc1 = (message: string) => {
  ElMessage({
    type: 'success',
    message
  })
}
export const succ2: Isucc1 = (message: string) => {
  ElMessage({
    type: 'success',
    message,
    duration: 1000
  })
}

type Ierror1 = (message: string) => void
export const error1: Ierror1 = (message: string) => {
  ElMessage({
    type: 'error',
    message
  })
}

type Iwarning1 = (message: string) => void
export const warning1: Iwarning1 = (message: string) => {
  ElMessage({
    type: 'warning',
    message
  })
}

type Iinfo1 = (message: string) => void
export const info1: Iinfo1 = (message: string) => {
  ElMessage({
    type: 'info',
    message
  })
}